package nuc.ss.wl.service.impl;

import nuc.ss.wl.dao.TeacherDao;
import nuc.ss.wl.dao.impl.TeacherDaoImpl;
import nuc.ss.wl.entity.Teacher;
import nuc.ss.wl.service.TeacherService;

import java.util.List;

public class TeacherServiceImpl implements TeacherService {
    TeacherDao td = new TeacherDaoImpl();
    @Override
    public int add(Teacher teacher) {
        return td.save(teacher);
    }

    @Override
    public List<Teacher> findAll() {
        return td.findAll();
    }

    @Override
    public List<Teacher> findTea(int tno, String tname) {
        return td.find(tno,tname);
    }

    @Override
    public int delete(int tno) {
        return td.delete(tno);
    }

    @Override
    public Teacher findById(int tno) {
        return td.findById(tno);
    }

    @Override
    public int update(Teacher teacher) {
        return td.update(teacher);
    }
}
